package com.mail.service;

import org.thymeleaf.context.Context;

import java.io.File;

/**
 * @author shengtao
 * @Description:
 * @date 2018/09/12 9:41
 */
public interface MailService {

    /**
     * 发送文本邮件
     * @param deliver
     * @param receiver
     * @param carbonCopy
     * @param subject
     * @param conten
     * @return
     */
    long sendText(String deliver, String[] receiver, String[] carbonCopy, String subject, String conten);

    /**
     * 发送Html邮件
     * @param deliver
     * @param receiver
     * @param carbonCopy
     * @param subject
     * @param content
     * @param isHtml
     */
    void sendHtmlEmail(String deliver, String[] receiver, String[] carbonCopy, String subject, String content, boolean isHtml);

    /**
     * 带附件邮件
     * @param deliver
     * @param receiver
     * @param carbonCopy
     * @param subject
     * @param content
     * @param isHtml
     * @param fileName
     * @param file
     */
    void sendAttachmentFileEmail(String deliver, String[] receiver, String[] carbonCopy, String subject, String content, boolean isHtml, String fileName, File file);

    /**
     * 发送模板邮件
     * @param deliver
     * @param receiver
     * @param carbonCopy
     * @param subject
     * @param template
     * @param context
     */
    void sendTemplateEmail(String deliver, String[] receiver, String[] carbonCopy, String subject, String template, Context context);

    /**
     * 发送图片邮件
     * @param deliver
     * @param receiver
     * @param carbonCopy
     * @param subject
     * @param srcPath
     * @param srcName
     */
    void sendOnlineImageEmail(String deliver, String[] receiver, String[] carbonCopy, String subject,String context, String srcPath, String srcName);

}
